﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using ShopShop.Models;

namespace ShopShop.Controllers
{
    public class SubCategoryController : Controller
    {
        //
        // GET: /SubCategory/

        BanGiayEntities db = new BanGiayEntities();
        public ActionResult Index(string id)
        {
            var cat = db.SubCategories.Where(x => x.CategoryId.Equals(id));

            return View(cat);
        }

        public ActionResult Details(string id)
        {
            var cat = db.SubCategories.FirstOrDefault(x => x.SubCatId.Equals(id));

            return View(cat);
        }
    }
}
